package cn.blb.service.edu.entity.dto;


import cn.blb.service.edu.entity.Chapter;
import cn.blb.service.edu.entity.Video;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

@Data
@Accessors(chain = true)
@ApiModel(value = "ChapterDto对象", description = "章节小节")
public class ChapterDto {

    public ChapterDto() {
    }

    public ChapterDto(Chapter chapter) {
        this.id=chapter.getId();
        this.courseId=chapter.getCourseId();
        this.sort=chapter.getSort();
        this.title=chapter.getTitle();
    }

    private String id;
    @ApiModelProperty("课程ID")
    @TableField("course_id")
    private String courseId;

    @ApiModelProperty("章节名称")
    @TableField("title")
    private String title;

    @ApiModelProperty("显示排序")
    @TableField("sort")
    private Integer sort;

    private List<Video> videoVos;
}

